In [20]:
import os, json, pprint
In [21]:
collection_list = []
collections to include:
In [22]:
brainmaps = {
'class_name' : 'wsBrainMapsCollection',
}
base = {
'class_name' : 'wsCollectionObject',
'title' : 'Image series',
'description' : 'Collections of one or more high resolution image sets',
'children' : [ brainmaps ]
}
collection_list.append(base)
In [23]:
autism = {
'class_name' : 'wsAutismRootCollection',
}
base = {
'class_name' : 'wsCollectionObject',
'title' : 'Medical content',
'description' : 'Medical content, raw and education',
'children' : [ autism ]
}
collection_list.append(base)
In [24]:
pprint.pprint(collection_list)
In [25]:
json_content = open('defaults.json', 'w')
json_content.write(json.dumps(collection_list))
json_content.close()
In [ ]: